<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>打砖块游戏</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="game-container">
        <div class="game-header">
            <h1>打砖块游戏</h1>
            <div class="score-container">
                <span>分数: </span>
                <span id="score">0</span>
            </div>
            <div class="lives-container">
                <span>生命: </span>
                <span id="lives">3</span>
            </div>
        </div>
        
        <canvas id="gameCanvas" width="800" height="600"></canvas>
        
        <div class="controls">
            <button id="startBtn">开始游戏</button>
            <button id="pauseBtn">暂停</button>
            <button id="restartBtn">重新开始</button>
        </div>

        <div class="game-instructions">
            <h2>游戏说明</h2>
            <p>使用左右箭头键或A/D键控制挡板移动。</p>
            <p>空格键: 开始/暂停游戏</p>
            <p>R键: 重新开始游戏</p>
        </div>
    </div>

    <div id="gameOverModal" class="modal">
        <div class="modal-content">
            <h2>游戏结束</h2>
            <p>你的最终分数是: <span id="finalScore">0</span></p>
            <button id="playAgainBtn">再玩一次</button>
        </div>
    </div>

    <div id="levelCompleteModal" class="modal">
        <div class="modal-content">
            <h2>恭喜!</h2>
            <p>你通过了这个关卡!</p>
            <p>你的分数是: <span id="levelScore">0</span></p>
            <button id="nextLevelBtn">下一关</button>
        </div>
    </div>

    <script src="game.js"></script>
</body>
</html> 